next
Round
Technologies
Saved
Contribute
Login
next
Round
Technologies
Saved
Contribute
Login
Question Loading...
Event Loop
1. Explain the event loop.
Level: Expert | Frequency: High
2. Explain process.next.tick()
Level: Expert | Frequency: High
3. What could be the disadvantages of process.nextTick()
Level: Expert | Frequency: High
4. Why use process.nextTick()?
Level: Expert | Frequency: High
5. What is the difference between the microtask queue and the macrotask (callback) queue?
Level: Expert | Frequency: High
6. How does Promise.then() differ from setTimeout() in terms of execution order?
Level: Expert | Frequency: High
7. What is queueMicrotask()? How does it differ from Promise.resolve().then()?
Level: Expert | Frequency: High
8. How does the event loop handle long-running synchronous code? What is 'blocking the event loop' and how do you avoid it in production?
Level: Expert | Frequency: High
9. How would you profile and detect event loop lag in a production Node.js service? What tools and metrics do you use? (e.g., perf_hooks, Clinic.js, event_loop_utilization)
Level: Expert | Frequency: High
10. How does the browser's event loop differ from Node.js's event loop?
Level: Expert | Frequency: High
11. How do streams and backpressure in Node.js relate to the event loop? Why does improper stream handling block or overload the loop?
Level: Expert | Frequency: High
12. What is 'starvation' in the context of the event loop? Give a real-world example.
Level: Expert | Frequency: High
13. How do you design a CPU-intensive task (e.g., image processing, ML inference) in a Node.js app without blocking the event loop?
Level: Expert | Frequency: High
14. How does the event loop relate to memory leaks? Can retained closures in the callback queue prevent garbage collection?
Level: Expert | Frequency: High
15. What strategies do you use to keep the event loop healthy at scale? (offloading, chunking, job queues like BullMQ, worker threads)
Level: Expert | Frequency: High
All Topics
Basics
Event Loop
Buffers
Streams
Events
Modules
Worker Threads
File Operations
Threads
Performance Optimisation
Websockets
Time functions
Clusters
Crypto